projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6ec71a
)
Add the semicolon missing from the generated main.rs contents.
author
jbranchaud
<jbranchaud@gmail.com>
Wed, 12 Nov 2014 05:00:05 +0000
(23:00 -0600)
committer
jbranchaud
<jbranchaud@gmail.com>
Wed, 12 Nov 2014 05:00:05 +0000
(23:00 -0600)
When you run `cargo new project-name --bin`, a project is generated by cargo
with a file, `src/main.rs`. This file has a main function with one line that
prints hello, world, but a semicolon is missing from the end of the
expression.
src/cargo/ops/cargo_new.rs
patch
|
blob
|
history
diff --git
a/src/cargo/ops/cargo_new.rs
b/src/cargo/ops/cargo_new.rs
index e3eda89999f17a91f5380d0128e5860fbe1c766f..84ea5bda2dd4e3336b791358b72eb7f9765e2f29 100644
(file)
--- a/
src/cargo/ops/cargo_new.rs
+++ b/
src/cargo/ops/cargo_new.rs
@@
-92,7
+92,7
@@
authors = ["{}"]
if opts.bin {
try!(File::create(&path.join("src/main.rs")).write_str("\
fn main() {
- println!(\"Hello, world!\")
+ println!(\"Hello, world!\")
;
}
"));
} else {